package com.etlmaster.transformer.funcs;

import java.util.Map;

import com.etlmaster.executor.annotation.StepInstruction;
import com.etlmaster.executor.trans.core.Line;
import com.etlmaster.executor.trans.core.LineTransProcessor;


/**
 * 行级处理 删除字段
 * @author wugf
 * @date 2016-04-29
 */
@StepInstruction("delete")
public class TransFieldRemove  extends LineTransProcessor{

	public TransFieldRemove(String sourceTab,String sourceCol,String targetTab,String targetCol,String changeCode,Map paramStr,Map var){
		
		super( sourceTab,sourceCol,targetTab,targetCol,changeCode, paramStr,var);
	
	}
	@Override
	public void transField(Line line) {
		int position=line.getMeta().getColPosition(getSourceTab().toUpperCase()+"_"+getSourceCol().toUpperCase());
		line.getMeta().getFieldMetas()[position].setDelete(true);
		//line.deleteField(getFieldIndex(line));
		
	}

}
